ie = false;
if (document.all) {
	var ie = true;
}
function myYoutubePlaylist_cy(ytSrc,containerId,type,play) {
	if (type == null || type == '') {
		type = 'v';
	}
	document.getElementById(containerId).innerHTML = eval("myYoutubePlaylist_cf('',ytSrc,500,307,type,play)");
}

function myYoutubePlaylist_cf(FlashVars,movie,width,height,type,play) {
	if (play == 'play') {
		play = '&autostart=1';
	}
	myYoutubePlaylist_cfStr = '';
	myYoutubePlaylist_cfStr += '';
	myYoutubePlaylist_cfStr += '';
	myYoutubePlaylist_cfStr += '';
	myYoutubePlaylist_cfStr += '<embed width="100%" height="450" src="http://www.youtube.com/'+ type +'/'+ movie +'?version=3&hl=en_US'+ play +'" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true"/>';
	myYoutubePlaylist_cfStr += '';
	return myYoutubePlaylist_cfStr;
}

function myYoutubePlaylist_dl(allVideos,containerId,targetContainerId) {
	allVideosArr = allVideos.split(', ');
	if (allVideosArr.length > 1) {
		allVideosLi = '<div class="myYoutubePlaylist_Ul" >';	
		for (var i=0; i < allVideosArr.length; i++) {
			thisLink = 'javascript:myYoutubePlaylist_cy(\''+allVideosArr[i]+'\',\''+targetContainerId+'\',\'\',\''+'play'+'\');'
			allVideosLi += '<a href="'+thisLink+'">' + '<img class="myYoutubePlaylist_Img"  alt="" src="http://i3.ytimg.com/vi/'+allVideosArr[i]+'/default.jpg"/>' + '</'+'a>';
		}
		allVideosLi += '</div>';
		document.getElementById(containerId).innerHTML = allVideosLi;
	} else {
		document.getElementById(containerId).style.display = 'none';
	}
}